<html>
<head>
  <script src="../lib/OpenLayers.js"></script>
  <script type="text/javascript"><!--
    var icon; 
    
    function test_01_Icon_constructor (t) {
        t.plan( 5 );
        icon = new OpenLayers.Icon("",new OpenLayers.Size(5,6));
        t.ok( icon instanceof OpenLayers.Icon, "new OpenLayers.Icon returns Icon object" );
        t.ok( icon.size instanceof OpenLayers.Size, "icon.size returns Size object" );
        t.eq( icon.size.w, 5, "icon.size.w returns correct value" );
        t.eq( icon.size.h, 6, "icon.size.w returns correct value" );
        t.eq( icon.url, "", "icon.url returns str object" );
    }
    function test_02_Icon_clone (t) {
        t.plan( 4 );
        icon = new OpenLayers.Icon("a",new OpenLayers.Size(5,6));
        t.ok( icon instanceof OpenLayers.Icon, "new OpenLayers.Icon returns Icon object" );
        var cloned = icon.clone();
        t.ok( cloned instanceof OpenLayers.Icon, "clone is an OpenLayers.Icon" );
        cloned.url = "b"
        t.eq( icon.url, "a", "icon.url doesn't change with clone's url" );
        t.eq( cloned.url, "b", "cloned.url does change when edited" );
    }

  // -->
  </script>
</head>
<body>
</body>
</html>
